<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>The IPTC Command-Line Utility</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
<link rel="home" href="index.html" title="libiptcdata Reference Manual">
<link rel="up" href="index.html" title="libiptcdata Reference Manual">
<link rel="prev" href="iptc-about.html" title="About libiptcdata">
<link rel="next" href="iptc-overview.html" title="libiptcdata Overview">
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="ch01.html" title="IPTC Data Manipulation">
<link rel="chapter" href="ch02.html" title="Format-specific Functions">
<link rel="chapter" href="ch03.html" title="Helper Functions">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="iptc-about.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td> </td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libiptcdata Reference Manual</th>
<td><a accesskey="n" href="iptc-overview.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry" lang="en">
<a name="iptc-commandline"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">The IPTC Command-Line Utility</span></h2>
<p>The IPTC Command-Line Utility — how to modify IPTC data from the command-line</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1" lang="en">
<a name="command-line"></a><h2>The IPTC Command-Line Utility</h2>
<p>
	 libiptcdata ships with a companion utility, <span class="application">iptc</span>,
	 which provides a command-line interface for viewing and modifying the IPTC
	 data of a JPEG file.  Its usage is as follows:

	 </p>
<pre class="programlisting">
Utility for viewing and modifying the contents of IPTC metadata in images

Usage: iptc [OPTIONS] [FILE]...

Examples:
  iptc image.jpg       # display the IPTC metadata contained in image.jpg
  iptc -m Caption -v "Foo" *.jpg
                       # set caption "Foo" in all jpegs of the curr. dir.
  iptc -a Keywords -v "vacation" *.jpg
  iptc -a 2:25 -v "vacation" *.jpg
                       # either command adds keyword "vacation" to all jpegs
  iptc -d Keywords:1 image.jpg
                       # removes keyword number 1 (the 2nd) from image.jpg
  iptc -d Keywords:all image.jpg
                       # removes all keywords from image.jpg

Operations:
  -a, --add=TAG        add new tag with identifier TAG
  -m, --modify=TAG     modify tag with identifier TAG (add if not present)
  -v, --value=VALUE    value for added/modified tag
  -d, --delete=TAG     delete tag with identifier TAG
  -p, --print=TAG      print value of tag with identifier TAG

Options:
  -q, --quiet          produce less verbose output
  -b, --backup         backup any modified files
      --no-sort        do not sort tags before saving

Informative output:
  -l, --list           list the names of all known tags (i.e. Caption, etc.)
  -L, --list-desc=TAG  print the name and description of TAG
      --help           print this help, then exit
      --version        print iptc program version number, then exit
	 </pre>
<p>
	</p>
<p>
	 The program returns success whenever at least one operation succeeds on
	 at least one file.  The program returns failure when no operation succeeds
	 on any file.  Thus, if you intend to use it in a script and need to know
	 whether each operation succeeds, only one operation should be performed
	 at a time so the return value is meaningful for that operation.
	</p>
<p>
	 iptc also serves as an easy way to test the features of the libiptcdata
	 library, although the library itself has many more features than iptc
	 exposes.  Lastly, the source code of iptc also serves as a reference
	 for writing other applications that use libiptcdata.
	</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.10</div>
</body>
</html>
